package org.itboys.seller.constant;

import org.itboys.seller.entity.SellerMenu;

import com.google.common.base.Function;

/**
 * 常量定义
 * @author weisky
 *
 * 2016年4月8日
 */
public class SellerConstants {
	
	public static final Integer TYPE_SUPER = 1;// 超级用户
	public static final Integer TYPE_COMMON = 2;// 普通用户
	
	public static final Integer TYPE_ZERO = 0;
	public static final Integer TYPE_ONE = 1;
	public static final Integer TYPE_TWO = 2;
	public static final Integer TYPE_THREE = 3;
	public static final Integer TYPE_FOUR = 4;
	
	public interface SellerPermissionType{
		public static final String TYPE_MENU="menu";//菜单权限
		public static final String TYPE_ACCESS="access";//访问权限
		public static final String TYPE_UI="access";//展示权限
		public static final String TYPE_VIR="vir";//虚拟权限
	}
	
	public interface transform{
		public static Function<SellerMenu, Long> getMenuId = new Function<SellerMenu, Long>() {
			@Override
			public Long apply(SellerMenu input) {
				return input.getId();
			}
		};
	}
	
	/**
	 * 权限类型 菜单权限
	 */
	public static final String PERMISSION_TYPE_MENU="menu";
	/**
	 * 权限类型 访问权限
	 */
	public static final String PERMISSION_TYPE_ACCESS="access";
	/**
	 * 权限类型 展示权限
	 */
	public static final String PERMISSION_TYPE_UI="ui";
	/**
	 * 权限类型 虚拟权限
	 */
	public static final String PERMISSION_TYPE_VIR="vir";
	
	/**
	 * 操作成功
	 */
	public static final int ACTION_SUCCESS = 1;
	
	/**
	 * 操作失败
	 */
	public static final int ACTION_FAIL = 0;
	
	/**
	 * 值已存在
	 */
	public static final int VALUE_EXIST = 2;
	
	/**
	 * 冻结账号
	 */
	public static final int ACCOUNT_FROZEN = 0;

}
